<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>微信 Information Report Demo</title>
<base href="${basePath}" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, user-scalable=0">
<link rel="stylesheet" href="<%=basePath%>assets/wx/style.css">
</head>
<body ontouchstart="">
	<div class="wxapi_container">

		<div class="lbox_close wxapi_form">

			<h3 id="menu-image">图像接口</h3>
			<span class="desc">拍照或从手机相册中选图接口</span>
			<button class="btn btn_primary" id="chooseImage">chooseImage</button>

			<span class="desc">上传图片接口</span>
			<button class="btn btn_primary" id="uploadImage">uploadImage</button>
			<span id="info"></span>

			<h3 id="menu-device">设备信息接口</h3>
			<span class="desc">获取网络状态接口</span>
			<button class="btn btn_primary" id="getNetworkType">getNetworkType</button>

			<h3 id="menu-location">地理位置接口</h3>
			<span class="desc">使用微信内置地图查看位置接口</span>
			<button class="btn btn_primary" id="openLocation">openLocation</button>
			<span class="desc">获取地理位置接口</span>
			<button class="btn btn_primary" id="getLocation">getLocation</button>

			<h3 id="menu-scan">微信扫一扫</h3>
			<span class="desc">调起微信扫一扫接口</span>
			<button class="btn btn_primary" id="scanQRCode0">scanQRCode(微信处理结果)</button>
			<button class="btn btn_primary" id="scanQRCode1">scanQRCode(直接返回结果)</button>
			
			<h3 id ="menu-bind">绑定设备和设施</h3>
			<span class="desc">调用微信扫一扫和获取当前经纬度接口</span>
			<button class="btn btn_primary" id="bindDev">bindDev(绑定设备到设施)</button>
		</div>
	</div>
	<%String facCode=request.getParameter("facilitiesCode");%>
	<div id="facCode" hidden="true"><%=facCode%></div>
</body>
<script src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script>
	wx.config({
		debug : false,
		appId : '${wechat.appId}',
		timestamp : '${timestamp}',
		nonceStr : '${noncestr}',
		signature : '${signature}',
		jsApiList : [ 'chooseImage', 'uploadImage', 'getNetworkType',
				'openLocation', 'getLocation', 'scanQRCode']
	});
</script>
<script src="<%=basePath%>assets/wx/zepto.min.js"></script>
<script src="<%=basePath%>assets/wx/inforptdemo.js">
	
</script>
<script type="text/javascript">
	
</script>
</html>
